package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fir=new FileOutputStream("del.txt",true);
        String line="打死你个龟孙";
        byte[] data=line.getBytes(StandardCharsets.UTF_8);
        fir.write(data);
        fir.write(",小龟孙".getBytes(StandardCharsets.UTF_8));
        System.out.println("搞定");
        fir.close();

    }
}
